package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Question;
import cn.wolfcode.trip.base.query.QuestionQueryObject;

import java.util.List;

public interface QuestionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Question record);

    Question selectByPrimaryKey(Long id);

    List<Question> selectAll();

    List<Question> queryForList(QuestionQueryObject qo);

    List<Question> selectByUserId(Long userId);

    int updateByPrimaryKey(Question record);

    /**
     * 删除问题了也要删除答案
     * @param questionId
     */
    void deleteRelationByQuestionId(Long questionId);
}